<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        img {
            position: absolute;
        }
        .hhh {
            position: relative;
            width: 200px;
            height: 200px;
            margin: 100px auto;
            background-color: aqua;
        }

        .moreTitle {
            position: absolute;
            top: 200px;
            width: 200px;
            height: 100px;
            box-sizing: border-box;
            padding-top: 50px;
            background-color: skyblue;
        }
        .moreTitle::after {
            position: absolute;
            content: '';
            top: -25px;
            left: -25px;
            width: 50px;
            height: 50px;
            background-color: green;
        }
        .moreTitle::before {
            position: absolute;
            content: '';
            top: 0;
            width: 200px;
            height: 50px;
            background-color: red;
        }
    </style>
</head>
<body>
    <div class="hhh">
        你真棒！
    </div>

    <script>
        let div = document.querySelector('.hhh');
        let moreTitle = document.createElement('div');
        let string;
        moreTitle.className = 'moreTitle';
        div.addEventListener('mousemove',function (e) {

            if (! div.contains(moreTitle)) {
                string = div.innerText;
                moreTitle.innerText = string;
                div.appendChild(moreTitle);
            }
                let x = e.pageX - div.offsetLeft + 20;
                let y = e.pageY - div.offsetTop + 50;
                moreTitle.style.left = x +  'px';
                moreTitle.style.top = y + 'px';
            console.log('我来盒子啦');
        });
        div.addEventListener('mouseout',function (){

            if (div.contains(moreTitle))
            div.removeChild(moreTitle);
            console.log('我出盒子啦');
        });
    </script>
</body>
</html>